package org.example.enums;

/**
 * 订单类型枚举
 */
public enum OrderTypeEnums {
    RECHARGE(1, "账户充值"), BUY_PRODUCT(2, "购买/续费域名"),
    SERVICE_CHARGE(3,"域名出售服务费");
    private int id;

    private String desc;

    OrderTypeEnums(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static OrderTypeEnums getEnum(int id) {
        for (OrderTypeEnums enums : OrderTypeEnums.values()) {
            if (enums.getId() == id) {
                return enums;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }
}
